<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org" 
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
	layout:decorator="layout">
<head>
<title>Log in</title>
</head>
<body>
	<div layout:fragment="content">
		<div class="panel col-md-5">
			<div class="panel panel-primary">
				<div class="panel-heading">Login Form</div>
				<div class="panel-body">

					<form action="home" th:action="@{/login}" method="post">
						<div class="form-group has-feedback">
							<input type="email" class="form-control" name="username"
								placeholder="Email" /> <span
								class="glyphicon glyphicon-envelope form-control-feedback"></span>
						</div>
						<div class="form-group has-feedback">
							<input type="password" class="form-control" name="password"
								placeholder="Password" /> <span
								class="glyphicon glyphicon-lock form-control-feedback"></span>
						</div>
						<div class="form-group">
							<label>
						      <input type="checkbox" name="remember-me"> Remember Me
						    </label>
						</div>
						<div class="row">
							<div class="form-group col-xs-offset-8 col-xs-4">
								<button type="submit" class="btn btn-primary btn-block btn-flat"
									th:text="#{label.login}">LogIn</button>
							</div>
						</div>
						<div class="row">
							<div class="col-xs-12">
								<div th:if="${param.error}"
									class="alert alert-danger alert-dismissable">
									<p>
										<i class="icon fa fa-ban"></i> <span
											th:text="#{error.login_failed}">Invalid Email and
											Password.</span>
									</p>
								</div>
								<div th:if="${param.logout}"
									class="alert alert-info alert-dismissable">
									<p>
										<i class="icon fa fa-info"></i> <span
											th:text="#{info.logout_success}">You have been logged
											out.</span>
									</p>
								</div>
								<div th:if="${msg!=null}"
									class="alert alert-warning alert-dismissable">
									<p>
										<i class="icon fa fa-warning"></i> <span th:text="${msg}"></span>
									</p>
								</div>
							</div>

						</div>
					</form>
				</div>
			</div>

		</div>

	</div>
</body>
</html>
